﻿using System;

namespace Tomato.Libraries.Databases.Models
{
    /// <summary>
    /// Class to present currency objects.
    /// </summary>
    public class Currency
    {
        /// <summary>
        /// Primary key.
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// Currency name.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Iso code.
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// Currency symbol.
        /// </summary>
        public string Symbol { get; set; }

        /// <summary>
        /// Creation time.
        /// </summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// Last modified time.
        /// </summary>
        public DateTime UpdatedAt { get; set; }

        /// <summary>
        /// Serializes this currency.
        /// </summary>
        /// <returns>A string which presents this currency.</returns>
        public override string ToString( )
        {
            return string.Format( "Id = {0}, Code = {1}, Name = {2}, Symbol = {3}",
                                  Id.ToString( ),
                                  Code,
                                  Name,
                                  Symbol );
        }
    }
}